home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JTreeBeanInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  5.3 KB  |  58 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Image;
  4. import java.beans.BeanDescriptor;
  5. import java.beans.PropertyDescriptor;
  6. import java.beans.SimpleBeanInfo;
  7. import javax.swing.beaninfo.SwingBeanInfo;
  8.  
  9. public class JTreeBeanInfo extends SwingBeanInfo {
  10.    private static final Class classJTree;
  11.    // $FF: synthetic field
  12.    static Class class$javax$swing$JTree;
  13.  
  14.    static {
  15.       classJTree = class$javax$swing$JTree != null ? class$javax$swing$JTree : (class$javax$swing$JTree = class$("javax.swing.JTree"));
  16.    }
  17.  
  18.    // $FF: synthetic method
  19.    static Class class$(String var0) {
  20.       try {
  21.          return Class.forName(var0);
  22.       } catch (ClassNotFoundException var2) {
  23.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  24.       }
  25.    }
  26.  
  27.    private PropertyDescriptor createPropertyDescriptor(String var1, Object[] var2) {
  28.       return super.createPropertyDescriptor(classJTree, var1, var2);
  29.    }
  30.  
  31.    public BeanDescriptor getBeanDescriptor() {
  32.       return ((SwingBeanInfo)this).createBeanDescriptor(classJTree, new Object[]{"preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "<A description of this component>."});
  33.    }
  34.  
  35.    public Image getIcon(int var1) {
  36.       switch (var1) {
  37.          case 1:
  38.             Image var5 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTreeColor16.gif");
  39.             return var5 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif") : var5;
  40.          case 2:
  41.             Image var4 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTreeColor32.gif");
  42.             return var4 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif") : var4;
  43.          case 3:
  44.             Image var3 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTreeMono16.gif");
  45.             return var3 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif") : var3;
  46.          case 4:
  47.             Image var2 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JTreeMono32.gif");
  48.             return var2 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif") : var2;
  49.          default:
  50.             return super.getIcon(var1);
  51.       }
  52.    }
  53.  
  54.    public PropertyDescriptor[] getPropertyDescriptors() {
  55.       return new PropertyDescriptor[]{this.createPropertyDescriptor("selectionCount", new Object[]{"shortDescription", "selectionCount"}), this.createPropertyDescriptor("visibleRowCount", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The number of rows that are to be displayed."}), this.createPropertyDescriptor("UIClassID", new Object[]{"shortDescription", "UIClassID"}), this.createPropertyDescriptor("editing", new Object[]{"shortDescription", "editing"}), this.createPropertyDescriptor("selectionEmpty", new Object[]{"shortDescription", "selectionEmpty"}), this.createPropertyDescriptor("editingPath", new Object[]{"shortDescription", "editingPath"}), this.createPropertyDescriptor("selectionPaths", new Object[]{"shortDescription", "selectionPaths"}), this.createPropertyDescriptor("accessibleContext", new Object[]{"shortDescription", "accessibleContext"}), this.createPropertyDescriptor("invokesStopCellEditing", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Determines what happens when editing is interrupted, selecting another node in the tree, a change in the tree's data, or some other means."}), this.createPropertyDescriptor("UI", new Object[]{"shortDescription", "UI"}), this.createPropertyDescriptor("preferredScrollableViewportSize", new Object[]{"shortDescription", "preferredScrollableViewportSize"}), this.createPropertyDescriptor("rowHeight", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The height of each cell."}), this.createPropertyDescriptor("selectionModel", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The tree's selection model."}), this.createPropertyDescriptor("leadSelectionRow", new Object[]{"shortDescription", "leadSelectionRow"}), this.createPropertyDescriptor("largeModel", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Whether the UI should use a large model."}), this.createPropertyDescriptor("rootVisible", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Whether or not the root node from the TreeModel is visible."}), this.createPropertyDescriptor("leadSelectionPath", new Object[]{"shortDescription", "leadSelectionPath"}), this.createPropertyDescriptor("fixedRowHeight", new Object[]{"shortDescription", "fixedRowHeight"}), this.createPropertyDescriptor("scrollableTracksViewportWidth", new Object[]{"shortDescription", "scrollableTracksViewportWidth"}), this.createPropertyDescriptor("cellEditor", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The cell editor. A null value implies the tree cannot be edited."}), this.createPropertyDescriptor("scrollsOnExpand", new Object[]{"shortDescription", "scrollsOnExpand"}), this.createPropertyDescriptor("scrollableTracksViewportHeight", new Object[]{"shortDescription", "scrollableTracksViewportHeight"}), this.createPropertyDescriptor("model", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The TreeModel that will provide the data."}), this.createPropertyDescriptor("showsRootHandles", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Whether the node handles are to be displayed."}), this.createPropertyDescriptor("selectionRows", new Object[]{"shortDescription", "selectionRows"}), this.createPropertyDescriptor("editable", new Object[]{"bound", Boolean.TRUE, "shortDescription", "Whether the tree is editable."}), this.createPropertyDescriptor("rowCount", new Object[]{"shortDescription", "rowCount"}), this.createPropertyDescriptor("minSelectionRow", new Object[]{"shortDescription", "minSelectionRow"}), this.createPropertyDescriptor("selectionPath", new Object[]{"shortDescription", "selectionPath"}), this.createPropertyDescriptor("lastSelectedPathComponent", new Object[]{"shortDescription", "lastSelectedPathComponent"}), this.createPropertyDescriptor("cellRenderer", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The TreeCellRenderer that will be used to draw each cell."}), this.createPropertyDescriptor("maxSelectionRow", new Object[]{"shortDescription", "maxSelectionRow"})};
  56.    }
  57. }
  58.